package com.sinosun.autotestmachine.tools.reader;

/**
 * 任务读取模式
 * @author HYW
 *
 */
public enum ReadMode {
	FILE(0),
	NETWORK(1),
	FILE_NETWORK(2),
	NONE(-1);
	
	private int value;
	
	ReadMode(int value) {
		this.value = value;
	}
	
	public int value() {
		return value;
	}
	
	public static ReadMode valueOf(int value) {
		switch(value) {
		case 0:
			return FILE;
		case 1:
			return NETWORK;
		case 2:
			return FILE_NETWORK;
		case 3:
			return NONE;
		default:
			return null;
		}
	}
}
